package com.bd.rj.frontstage.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bd.rj.common.entity.Post;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 白世俊
 * @since 2025-01-03
 */
@Mapper
public interface PostMapper extends BaseMapper<Post> {
    /**
     * 条件查询职位
     *
     * @author WBW
     * @param address
     * @param type
     * @param salary
     * @return
     */
    List<Post> conditionSelectPost(@Param("address") String address,@Param("type") String type,@Param("salary") String salary);

    /**
     * 获取热门职位
     *
     * @author WBW
     * @return
     */
    @Select("SELECT * FROM post ORDER BY RAND() LIMIT 10")
    List<Post> gethotPost();
}
